set more off 
mata: mata set matafavor speed, perm

use "E:\隨身硬碟備份\E\TRY\findev_2017\Fin_Co2_pol_2020\program\n82_4y_8417_renew.dta",clear
tsset id period

***Table 2.Non-linear effects of financial development and structure on CO2 per capita***

**political right**
*column(1). size, CV and CO2*
xtabond2 lnav_co2pc c.lnav_devsz c.lnav_devsz#c.sc_right c.lnav_strsz c.lnav_strsz#c.sc_right c.sc_right ///
c.lnav_gdp c.lnav_gdp#c.lnav_gdp ln_co2pc0 ///
ln_trad0 ln_urb0 ln_sec0 ln_inds0, ///
gmm(c.lnav_devsz, lag(3 3) collapse)   gmm(c.lnav_devsz#c.sc_right, lag(2 3) collapse) ///
gmm(c.lnav_strsz, lag(1 3) orthogonal) gmm(c.lnav_strsz#c.sc_right, lag(2 2) collapse) ///
gmm(c.sc_right,   lag(1 1) collapse) ///
gmm(c.lnav_gdp,   lag(2 2) orthogonal) gmm(c.lnav_gdp#c.lnav_gdp,   lag(1 3)orthogonal) ///  
iv(ln_co2pc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0) ///
twostep small
*column(2). activity, CV and CO2*
xtabond2 lnav_co2pc c.lnav_devac c.lnav_devac#c.sc_right c.lnav_strac c.lnav_strac#c.sc_right c.sc_right ///
c.lnav_gdp c.lnav_gdp#c.lnav_gdp ln_co2pc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0, ///
gmm(c.lnav_devac, lag(3 3) collapse)   gmm(c.lnav_devac#c.sc_right, lag(2 3) collapse) ///
gmm(c.lnav_strac, lag(2 2) orthogonal) gmm(c.lnav_strac#c.sc_right, lag(2 4) orthogonal) ///
gmm(c.sc_right,   lag(2 2) collapse) ///
gmm(c.lnav_gdp,   lag(1 1) orthogonal) gmm(c.lnav_gdp#c.lnav_gdp,   lag(1 1) ) ///  
iv(ln_co2pc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0) ///
twostep small
*column(3). efficiency, CV and CO2*
xtabond2 lnav_co2pc c.lnav_devef c.lnav_devef#c.sc_right c.lnav_stref c.lnav_stref#c.sc_right c.sc_right ///
c.lnav_gdp c.lnav_gdp#c.lnav_gdp ln_co2pc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0, ///
gmm(c.lnav_devef, lag(1 1)collapse)    gmm(c.lnav_devef#c.sc_right, lag(2 2) collapse ) ///
gmm(c.lnav_stref, lag(2 3))            gmm(c.lnav_stref#c.sc_right, lag(2 2) collapse) ///
gmm(c.sc_right,   lag(1 2) collapse ) ///
gmm(c.lnav_gdp,   lag(1 2))  gmm(c.lnav_gdp#c.lnav_gdp, lag(1 2)) ///  
iv(ln_co2pc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0) ///
twostep small
*column(4). aggregate, CV and CO2*
xtabond2 lnav_co2pc c.fin_dev c.fin_dev#c.sc_right c.fin_str c.fin_str#c.sc_right c.sc_right ///
c.lnav_gdp c.lnav_gdp#c.lnav_gdp ln_co2pc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0, ///
gmm(c.fin_dev, lag(1 1))                gmm(c.fin_dev#c.sc_right, lag(2 2) collapse) ///
gmm(c.fin_str, lag(2 2) orthogonal)     gmm(c.fin_str#c.sc_right, lag(2 2) collapse) ///
gmm(c.sc_right,lag(2 2) collapse) ///
gmm(c.lnav_gdp,lag(1 1))                gmm(c.lnav_gdp#c.lnav_gdp,lag(1 2)) ///  
iv(ln_co2pc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0) ///
twostep small
*column(5). aggregate, CV and Energy use*
xtabond2 lnav_engpc c.fin_dev c.fin_dev#c.sc_right c.fin_str c.fin_str#c.sc_right c.sc_right ///
c.lnav_gdp c.lnav_gdp#c.lnav_gdp ln_engpc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0, ///
gmm(c.fin_dev, lag(1 1))                gmm(c.fin_dev#c.sc_right, lag(2 2) collapse) ///
gmm(c.fin_str, lag(2 2) orthogonal)     gmm(c.fin_str#c.sc_right, lag(2 2) collapse) ///
gmm(c.sc_right,lag(2 2) collapse) ///
gmm(c.lnav_gdp,lag(1 2))                gmm(c.lnav_gdp#c.lnav_gdp,lag(1 2)) ///  
iv(ln_engpc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0) ///
twostep small
*column(6). aggregate, CV and Green technology*
xtabond2 lnav_techpc c.fin_dev c.fin_dev#c.sc_right c.fin_str c.fin_str#c.sc_right c.sc_right ///
c.lnav_gdp c.lnav_gdp#c.lnav_gdp ln_techpc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0, ///
gmm(c.fin_dev, lag(2 4)orthogonal)     gmm(c.fin_dev#c.sc_right, lag(1 1)collapse ) ///
gmm(c.fin_str, lag(2 2))               gmm(c.fin_str#c.sc_right, lag(1 1)collapse ) ///
gmm(c.sc_right,lag(2 2) collapse) ///
gmm(c.lnav_gdp,lag(1 1)orthogonal)     gmm(c.lnav_gdp#c.lnav_gdp,lag(1 1)orthogonal) ///  
iv(ln_techpc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0) ///
twostep small


**democratic accountability**
*column(7). aggregate, CV and CO2*
xtabond2 lnav_co2pc c.fin_dev c.fin_dev#c.sc_da c.fin_str c.fin_str#c.sc_da c.sc_da ///
c.lnav_gdp c.lnav_gdp#c.lnav_gdp ln_co2pc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0, ///
gmm(c.fin_dev, lag(1 1) orthogonal)     gmm(c.fin_dev#c.sc_da, lag(2 2) collapse) ///
gmm(c.fin_str, lag(2 2) orthogonal)     gmm(c.fin_str#c.sc_da, lag(2 2) collapse) ///
gmm(c.sc_da,   lag(2 2) collapse) ///
gmm(c.lnav_gdp,lag(1 1))                gmm(c.lnav_gdp#c.lnav_gdp,lag(1 1)) ///  
iv(ln_co2pc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0) ///
twostep small
*column(8). aggregate, CV and Energy use*
xtabond2 lnav_engpc c.fin_dev c.fin_dev#c.sc_da c.fin_str c.fin_str#c.sc_da c.sc_da ///
c.lnav_gdp c.lnav_gdp#c.lnav_gdp ln_engpc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0, ///
gmm(c.fin_dev, lag(1 3) orthogonal)     gmm(c.fin_dev#c.sc_da, lag(1 2) collapse) ///
gmm(c.fin_str, lag(1 1) orthogonal)     gmm(c.fin_str#c.sc_da, lag(2 2) collapse) ///
gmm(c.sc_da,   lag(1 2) collapse) ///
gmm(c.lnav_gdp,lag(1 1))                gmm(c.lnav_gdp#c.lnav_gdp,lag(1 1)) ///  
iv(ln_engpc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0) ///
twostep small
*column(9). aggregate, CV and Green technology*
xtabond2 lnav_techpc c.fin_dev c.fin_dev#c.sc_da c.fin_str c.fin_str#c.sc_da c.sc_da ///
c.lnav_gdp c.lnav_gdp#c.lnav_gdp ln_techpc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0, ///
gmm(c.fin_dev, lag(1 1)orthogonal)     gmm(c.fin_dev#c.sc_da, lag(1 1)collapse ) ///
gmm(c.fin_str, lag(2 2))               gmm(c.fin_str#c.sc_da, lag(2 3)collapse ) ///
gmm(c.sc_da,   lag(2 3) collapse) ///
gmm(c.lnav_gdp,lag(1 1))                gmm(c.lnav_gdp#c.lnav_gdp,lag(1 1)) ///  
iv(ln_techpc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0) ///
twostep small


**democracy-polity2**
*column(10). aggregate, CV and CO2*
xtabond2 lnav_co2pc c.fin_dev c.fin_dev#c.sc_pol c.fin_str c.fin_str#c.sc_pol c.sc_pol ///
c.lnav_gdp c.lnav_gdp#c.lnav_gdp ln_co2pc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0, ///
gmm(c.fin_dev, lag(2 2) collapse)       gmm(c.fin_dev#c.sc_pol, lag(2 2) collapse) ///
gmm(c.fin_str, lag(1 1) orthogonal)     gmm(c.fin_str#c.sc_pol, lag(1 2) orthogonal) ///
gmm(c.sc_pol,  lag(2 2) collapse) ///
gmm(c.lnav_gdp,lag(1 1))                gmm(c.lnav_gdp#c.lnav_gdp,lag(1 1)) ///  
iv(ln_co2pc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0) ///
twostep small
*column(11). aggregate, CV and Energy use*
xtabond2 lnav_engpc c.fin_dev c.fin_dev#c.sc_pol c.fin_str c.fin_str#c.sc_pol c.sc_pol ///
c.lnav_gdp c.lnav_gdp#c.lnav_gdp ln_engpc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0, ///
gmm(c.fin_dev, lag(1 1) orthogonal)      gmm(c.fin_dev#c.sc_pol, lag(2 2)collapse) ///
gmm(c.fin_str, lag(2 2) orthogonal )     gmm(c.fin_str#c.sc_pol, lag(1 1)orthogonal ) ///
gmm(c.sc_pol,  lag(2 2) collapse) ///
gmm(c.lnav_gdp,lag(2 2) orthogonal)     gmm(c.lnav_gdp#c.lnav_gdp,lag(2 5)orthogonal) ///  
iv(ln_engpc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0) ///
twostep small
*column(12). aggregate, CV and Green technology*
xtabond2 lnav_techpc c.fin_dev c.fin_dev#c.sc_pol c.fin_str c.fin_str#c.sc_pol c.sc_pol ///
c.lnav_gdp c.lnav_gdp#c.lnav_gdp ln_techpc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0, ///
gmm(c.fin_dev, lag(1 1) collapse)      gmm(c.fin_dev#c.sc_pol, lag(1 1) collapse) ///
gmm(c.fin_str, lag(1 1))               gmm(c.fin_str#c.sc_pol, lag(1 1) ) ///
gmm(c.sc_pol,  lag(1 1) collapse ) ///
gmm(c.lnav_gdp,lag(1 2) orthogonal)    gmm(c.lnav_gdp#c.lnav_gdp,lag(1 1)orthogonal) ///  
iv(ln_techpc0 ln_trad0 ln_urb0 ln_sec0 ln_inds0)  ///
twostep small




log close
clear
